default_platform(:ios)

platform :ios do
  lane :cocoapods_integration_test do |options|
    cocoapods(
      clean_install: true
    )
    run_tests(
      workspace: "iOS-Cocoapods-Swift6.xcworkspace",
      scheme: "App",
      build_for_testing: true,
      destination: "platform=iOS Simulator,OS=18.4,name=iPhone 16 Pro"
    )
    run_tests(
      workspace: "iOS-Cocoapods-Swift6.xcworkspace", 
      scheme: "App",
      test_without_building: true,
      result_bundle: true,
      result_bundle_path: "fastlane/test_results/results.xcresult",
      destination: "platform=iOS Simulator,OS=18.4,name=iPhone 16 Pro"
    )
  end
end
